﻿package fpc.containers;
import fpc.layouts.GridLayout;
import fpc.layouts.ILayoutable;

class GridContainer extends Container<GridLayout>
{
	public function new() 
	{
		super(new GridLayout());
	}
	
	public function resetSizes()
	{
		_layout.resetSizes();
	}
	
	public function add(component:ILayoutable, row:Int, col:Int, rowSpan:Int = 1, colSpan:Int = 1)
	{
		_layout.add(component, row, col, rowSpan, colSpan);
	}
	
	public function remove(component:ILayoutable)
	{
		_layout.remove(component);
	}
	
	public function getColSize(index:Int)
	{
		return _layout.getColSize(index);
	}
	
	public function setColSize(index:Int, value:Float)
	{
		_layout.setColSize(index, value);
	}
	
	public function getColPercents(index:Int)
	{
		return _layout.getColPercents(index);
	}
	
	public function setColPercents(index:Int, value:Float)
	{
		_layout.setColPercents(index, value);
	}
	
	public function getRowSize(index:Int)
	{
		_layout.getRowSize(index);
	}
	
	public function setRowSize(index:Int, value:Float)
	{
		_layout.setRowSize(index, value);
	}
	
	public function getRowPersents(index:Int)
	{
		return _layout.getRowPersents(index);
	}
	
	public function setRowPercents(index:Int, value:Float)
	{
		_layout.setRowPercents(index, value);
	}
}